﻿namespace PMS.Services.Utils.Captcha
{
    public interface ICaptchaService
    {
        bool IsCaptchaEnabled { get; }
        /// <summary>
        /// 生成验证码图片
        /// </summary>
        /// <param name="charCount">图片中出现字符数</param>
        /// <param name="width">图片宽度</param>
        /// <param name="height">图片高度</param>
        /// <returns></returns>
        CaptchaInfo CreateCaptcha(int width = 85, int height = 40);
        /// <summary>
        /// 比对验证码
        /// </summary>
        /// <param name="model"></param>
        /// <param name="timeOut">单位秒，超时时间默认600秒（10分钟）</param>
        /// <returns></returns>
        CaptchaVerifyResult CaptchaVerify(CaptchaRequest model);
    }

}
